-- GENERATED SPELL FOR [Rifleman Middlecamp] --


function spell0_10804(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16572,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10804', 659, 1)
end

function spell1_10804(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16768,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10804', 609, 1)
end

function spell2_10804(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16772,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10804', 652, 1)
end

function spell3_10804(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16776,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10804', 673, 1)
end

function spell4_10804(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16777,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10804', 600, 1)
end

function spell5_10804(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16779,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10804', 601, 1)
end

function spell6_10804(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16780,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10804', 595, 1)
end

function Sorts_10804(pUnit, Event)
local choix_sorts_10804 = math.random(0, 6)
if choix_sorts_10804 == 0 then
pUnit:RegisterEvent('spell0_10804', 1, 1)
end
if choix_sorts_10804 == 1 then
pUnit:RegisterEvent('spell1_10804', 1, 1)
end
if choix_sorts_10804 == 2 then
pUnit:RegisterEvent('spell2_10804', 1, 1)
end
if choix_sorts_10804 == 3 then
pUnit:RegisterEvent('spell3_10804', 1, 1)
end
if choix_sorts_10804 == 4 then
pUnit:RegisterEvent('spell4_10804', 1, 1)
end
if choix_sorts_10804 == 5 then
pUnit:RegisterEvent('spell5_10804', 1, 1)
end
if choix_sorts_10804 == 6 then
pUnit:RegisterEvent('spell6_10804', 1, 1)
end
end

function mob10804_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10804', math.random(1500, 3000), 1)
end

function mob10804_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10804_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10804_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10804, 1, 'mob10804_Action')
RegisterUnitEvent(10804, 2, 'mob10804_Leave')
RegisterUnitEvent(10804, 3, 'mob10804_Kill')
RegisterUnitEvent(10804, 4, 'mob10804_Die')
